<div class="users index">
	<h2><?php echo __d('users','Users');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('username');?></th>
			<th><?php echo $this->Paginator->sort('modified');?></th>
			<th><?php echo $this->Paginator->sort('email');?></th>
			<th><?php echo $this->Paginator->sort('first_name');?></th>
			<th><?php echo $this->Paginator->sort('last_name');?></th>
			<th><?php echo $this->Paginator->sort('group_id');?></th>
			<th class="actions"><?php echo $this->Html->link(__d('users','New User'), array('action' => 'add')); ?></th>
	</tr>
	<?php
	foreach ($users as $user): 
	$onclck = 'onclick="document.location='.$this->Html->url( array('action' => 'view', $user['User']['id']),true).'"';
	?>
	<tr>
		<td <?php echo $onclck?>><?php echo h($user['User']['id']); ?>&nbsp;</td>
		<td <?php echo $onclck?>><?php echo h($user['User']['username']); ?>&nbsp;</td>
		<td <?php echo $onclck?>><?php echo h($user['User']['modified']); ?>&nbsp;</td>
		<td <?php echo $onclck?>><?php echo h($user['User']['email']); ?>&nbsp;</td>
		<td <?php echo $onclck?>><?php echo h($user['User']['first_name']); ?>&nbsp;</td>
		<td <?php echo $onclck?>><?php echo h($user['User']['last_name']); ?>&nbsp;</td>
		<td <?php echo $onclck?>>
			<?php echo $this->Html->link($user['Group']['name'], array('controller' => 'groups', 'action' => 'view', $user['Group']['id'])); ?>
		</td>
		<td class="actions">
			<?php echo $this->Html->link(__d('users','View'), array('action' => 'view', $user['User']['id'])); ?>
			<?php echo $this->Html->link(__d('users','Edit'), array('action' => 'edit', $user['User']['id'])); ?>
			<?php echo $this->Form->postLink(__d('users','Delete'), array('action' => 'delete', $user['User']['id']), null, __d('users','Are you sure you want to delete # %s?', $user['User']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __d('users','Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __d('users','previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__d('users','next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<?php echo $this->element('/menu/left')?>